﻿Imports System.Text

Public Class GumballMonitor
    Inherits MarshalByRefObject

    Private _machine As GumballMachine

    Public Sub New()
        MyBase.New()
    End Sub

    Public Sub New(ByVal machine As GumballMachine)
        Me.New()
        _machine = machine
    End Sub

    Public Function GetReport() As String
        Dim sb As New StringBuilder("")
        sb.AppendLine("Gumball Machine: " + _machine.Location)
        sb.AppendLine("Current inventory: " + _machine.Count.ToString + " gumballs")
        sb.AppendLine("Current state: " + _machine.CurrentState.ToString)

        Return sb.ToString
    End Function
End Class
